3.12.3 \(\int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx\) [1103]

3.12.3.1 Optimal result
3.12.3.2 Mathematica [A] (verified)
3.12.3.3 Rubi [A] (verified)
3.12.3.4 Maple [B] (verified)
3.12.3.5 Fricas [B] (verification not implemented)
3.12.3.6 Sympy [F]
3.12.3.7 Maxima [B] (verification not implemented)
3.12.3.8 Giac [B] (verification not implemented)
3.12.3.9 Mupad [B] (verification not implemented)

3.12.3.1 Optimal result

Integrand size = 28, antiderivative size = 69 \[ \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=-\frac {2 i a \sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f}+\frac {2 i a \sqrt {c+d \tan (e+f x)}}{f} \]

output
-2*I*a*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))*(c-I*d)^(1/2)/f+2*I*a 
*(c+d*tan(f*x+e))^(1/2)/f
 
3.12.3.2 Mathematica [A] (verified)

Time = 0.31 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.91 \[ \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=\frac {2 i a \left (-\sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )+\sqrt {c+d \tan (e+f x)}\right )}{f} \]

input
Integrate[(a + I*a*Tan[e + f*x])*Sqrt[c + d*Tan[e + f*x]],x]
 
output
((2*I)*a*(-(Sqrt[c - I*d]*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]]) 
 + Sqrt[c + d*Tan[e + f*x]]))/f
 
3.12.3.3 Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.07, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 4011, 3042, 4020, 27, 73, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}dx\)

\(\Big \downarrow \) 4011

\(\displaystyle \int \frac {a (c-i d)+a (i c+d) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+\frac {2 i a \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {a (c-i d)+a (i c+d) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx+\frac {2 i a \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 4020

\(\displaystyle \frac {i a^2 (c-i d)^2 \int \frac {1}{a \sqrt {c+d \tan (e+f x)} \left (a (i c+d)^2+a (c-i d) \tan (e+f x) (i c+d)\right )}d(a (i c+d) \tan (e+f x))}{f}+\frac {2 i a \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {i a (c-i d)^2 \int \frac {1}{\sqrt {c+d \tan (e+f x)} \left (a (i c+d)^2+a (c-i d) \tan (e+f x) (i c+d)\right )}d(a (i c+d) \tan (e+f x))}{f}+\frac {2 i a \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 73

\(\displaystyle \frac {2 i a^2 (d+i c) (c-i d)^2 \int \frac {1}{\frac {i (c-i d)^2 (i c+d)^2 \tan ^2(e+f x) a^3}{d}+\frac {(i c+d)^3 a}{d}}d\sqrt {c+d \tan (e+f x)}}{d f}+\frac {2 i a \sqrt {c+d \tan (e+f x)}}{f}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {2 i a \sqrt {c+d \tan (e+f x)}}{f}-\frac {2 a (d+i c) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f \sqrt {c-i d}}\)

input
Int[(a + I*a*Tan[e + f*x])*Sqrt[c + d*Tan[e + f*x]],x]
 
output
(-2*a*(I*c + d)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/(Sqrt[c - 
 I*d]*f) + ((2*I)*a*Sqrt[c + d*Tan[e + f*x]])/f
 

3.12.3.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4011
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int 
[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] 
, x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 
 0] && GtQ[m, 0]
 

rule 4020
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f)   Subst[Int[(a + (b/d)*x)^m/(d^2 + 
c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ 
b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
 
3.12.3.4 Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 804 vs. \(2 (57 ) = 114\).

Time = 0.73 (sec) , antiderivative size = 805, normalized size of antiderivative = 11.67

method result size
parts \(-\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {a d \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {a d \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f \sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}-\frac {a \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4 f d}+\frac {i a \left (2 \sqrt {c +d \tan \left (f x +e \right )}-\frac {\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4}+\frac {\left (-\sqrt {c^{2}+d^{2}}+c \right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}+\frac {\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{4}+\frac {\left (-\sqrt {c^{2}+d^{2}}+c \right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{f}\) \(805\)
derivativedivides \(\text {Expression too large to display}\) \(1179\)
default \(\text {Expression too large to display}\) \(1179\)

input
int((c+d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x,method=_RETURNVERBOSE)
 
output
-1/4*a/f/d*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*ln(d*tan(f*x+e)+c 
+(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+a/f 
*d/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f*x+e))^(1/2)+(2*(c^2+ 
d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2))+1/4*a/f/d*(2*(c^2+d^ 
2)^(1/2)+2*c)^(1/2)*c*ln(d*tan(f*x+e)+c+(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2 
)^(1/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+1/4*a/f/d*(2*(c^2+d^2)^(1/2)+2*c)^(1/2 
)*(c^2+d^2)^(1/2)*ln(d*tan(f*x+e)+c-(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1 
/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+a/f*d/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan 
((2*(c+d*tan(f*x+e))^(1/2)-(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d^2)^(1/ 
2)-2*c)^(1/2))-1/4*a/f/d*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c*ln(d*tan(f*x+e)+c 
-(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+I*a 
/f*(2*(c+d*tan(f*x+e))^(1/2)-1/4*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*ln(d*tan(f* 
x+e)+c+(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)+(c^2+d^2)^(1/2 
))+(-(c^2+d^2)^(1/2)+c)/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f 
*x+e))^(1/2)+(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)) 
+1/4*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*ln(d*tan(f*x+e)+c-(c+d*tan(f*x+e))^(1/2 
)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+(-(c^2+d^2)^(1/2)+c)/(2*( 
c^2+d^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f*x+e))^(1/2)-(2*(c^2+d^2)^(1 
/2)+2*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)))
 
3.12.3.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 306 vs. \(2 (53) = 106\).

Time = 0.26 (sec) , antiderivative size = 306, normalized size of antiderivative = 4.43 \[ \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=\frac {f \sqrt {-\frac {a^{2} c - i \, a^{2} d}{f^{2}}} \log \left (\frac {2 \, {\left (a c + {\left (i \, f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {a^{2} c - i \, a^{2} d}{f^{2}}} + {\left (a c - i \, a d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a}\right ) - f \sqrt {-\frac {a^{2} c - i \, a^{2} d}{f^{2}}} \log \left (\frac {2 \, {\left (a c + {\left (-i \, f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {a^{2} c - i \, a^{2} d}{f^{2}}} + {\left (a c - i \, a d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a}\right ) + 4 i \, a \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{2 \, f} \]

input
integrate((c+d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x, algorithm="fricas")
 
output
1/2*(f*sqrt(-(a^2*c - I*a^2*d)/f^2)*log(2*(a*c + (I*f*e^(2*I*f*x + 2*I*e) 
+ I*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) 
 + 1))*sqrt(-(a^2*c - I*a^2*d)/f^2) + (a*c - I*a*d)*e^(2*I*f*x + 2*I*e))*e 
^(-2*I*f*x - 2*I*e)/a) - f*sqrt(-(a^2*c - I*a^2*d)/f^2)*log(2*(a*c + (-I*f 
*e^(2*I*f*x + 2*I*e) - I*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d) 
/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(a^2*c - I*a^2*d)/f^2) + (a*c - I*a*d)*e 
^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/a) + 4*I*a*sqrt(((c - I*d)*e^(2*I 
*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))/f
 
3.12.3.6 Sympy [F]

\[ \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=i a \left (\int \left (- i \sqrt {c + d \tan {\left (e + f x \right )}}\right )\, dx + \int \sqrt {c + d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}\, dx\right ) \]

input
integrate((c+d*tan(f*x+e))**(1/2)*(a+I*a*tan(f*x+e)),x)
 
output
I*a*(Integral(-I*sqrt(c + d*tan(e + f*x)), x) + Integral(sqrt(c + d*tan(e 
+ f*x))*tan(e + f*x), x))
 
3.12.3.7 Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 4432 vs. \(2 (53) = 106\).

Time = 0.60 (sec) , antiderivative size = 4432, normalized size of antiderivative = 64.23 \[ \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=\text {Too large to display} \]

input
integrate((c+d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x, algorithm="maxima")
 
output
-4*((2*(I*sqrt(2)*a*cos(2*f*x + 2*e) - sqrt(2)*a*sin(2*f*x + 2*e) + I*sqrt 
(2)*a)*arctan2(-2*d*cos(2*f*x + 2*e) + 2*c*sin(2*f*x + 2*e) - (4*c^2*cos(2 
*f*x + 2*e)^2 + 4*c^2*sin(2*f*x + 2*e)^2 + (c^2 + d^2)*cos(4*f*x + 4*e)^2 
+ 4*c^2*cos(2*f*x + 2*e) + (c^2 + d^2)*sin(4*f*x + 4*e)^2 + 4*c*d*sin(2*f* 
x + 2*e) + c^2 + d^2 + 2*(2*c^2*cos(2*f*x + 2*e) - 2*c*d*sin(2*f*x + 2*e) 
+ c^2 - d^2)*cos(4*f*x + 4*e) + 4*(c*d*cos(2*f*x + 2*e) + c^2*sin(2*f*x + 
2*e) + c*d)*sin(4*f*x + 4*e))^(1/4)*(sqrt(2)*sqrt(-c + sqrt(c^2 + d^2))*co 
s(1/2*arctan2(-d*cos(4*f*x + 4*e) + c*sin(4*f*x + 4*e) + 2*c*sin(2*f*x + 2 
*e) + d, c*cos(4*f*x + 4*e) + 2*c*cos(2*f*x + 2*e) + d*sin(4*f*x + 4*e) + 
c)) - sqrt(2)*sqrt(c + sqrt(c^2 + d^2))*sin(1/2*arctan2(-d*cos(4*f*x + 4*e 
) + c*sin(4*f*x + 4*e) + 2*c*sin(2*f*x + 2*e) + d, c*cos(4*f*x + 4*e) + 2* 
c*cos(2*f*x + 2*e) + d*sin(4*f*x + 4*e) + c))), 2*c*cos(2*f*x + 2*e) + 2*d 
*sin(2*f*x + 2*e) + (4*c^2*cos(2*f*x + 2*e)^2 + 4*c^2*sin(2*f*x + 2*e)^2 + 
 (c^2 + d^2)*cos(4*f*x + 4*e)^2 + 4*c^2*cos(2*f*x + 2*e) + (c^2 + d^2)*sin 
(4*f*x + 4*e)^2 + 4*c*d*sin(2*f*x + 2*e) + c^2 + d^2 + 2*(2*c^2*cos(2*f*x 
+ 2*e) - 2*c*d*sin(2*f*x + 2*e) + c^2 - d^2)*cos(4*f*x + 4*e) + 4*(c*d*cos 
(2*f*x + 2*e) + c^2*sin(2*f*x + 2*e) + c*d)*sin(4*f*x + 4*e))^(1/4)*(sqrt( 
2)*sqrt(c + sqrt(c^2 + d^2))*cos(1/2*arctan2(-d*cos(4*f*x + 4*e) + c*sin(4 
*f*x + 4*e) + 2*c*sin(2*f*x + 2*e) + d, c*cos(4*f*x + 4*e) + 2*c*cos(2*f*x 
 + 2*e) + d*sin(4*f*x + 4*e) + c)) + sqrt(2)*sqrt(-c + sqrt(c^2 + d^2))...
 
3.12.3.8 Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 181 vs. \(2 (53) = 106\).

Time = 0.40 (sec) , antiderivative size = 181, normalized size of antiderivative = 2.62 \[ \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=2 \, a {\left (\frac {i \, \sqrt {d \tan \left (f x + e\right ) + c}}{f} + \frac {2 \, {\left (i \, c + d\right )} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} - i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{\sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} f {\left (-\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}}\right )} \]

input
integrate((c+d*tan(f*x+e))^(1/2)*(a+I*a*tan(f*x+e)),x, algorithm="giac")
 
output
2*a*(I*sqrt(d*tan(f*x + e) + c)/f + 2*(I*c + d)*arctan(2*(sqrt(d*tan(f*x + 
 e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*sqrt(-2*c + 2*sq 
rt(c^2 + d^2)) - I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt(c^2 + d^2)*sqrt 
(-2*c + 2*sqrt(c^2 + d^2))))/(sqrt(-2*c + 2*sqrt(c^2 + d^2))*f*(-I*d/(c - 
sqrt(c^2 + d^2)) + 1)))
 
3.12.3.9 Mupad [B] (verification not implemented)

Time = 7.89 (sec) , antiderivative size = 854, normalized size of antiderivative = 12.38 \[ \int (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)} \, dx=-2\,\mathrm {atanh}\left (\frac {32\,a^2\,d^4\,\sqrt {-\frac {\sqrt {-a^4\,d^2\,f^4}}{4\,f^4}-\frac {a^2\,c}{4\,f^2}}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{\frac {a\,d^4\,\sqrt {-a^4\,d^2\,f^4}\,16{}\mathrm {i}}{f^3}+\frac {a\,c^2\,d^2\,\sqrt {-a^4\,d^2\,f^4}\,16{}\mathrm {i}}{f^3}}+\frac {32\,c\,d^2\,\sqrt {-\frac {\sqrt {-a^4\,d^2\,f^4}}{4\,f^4}-\frac {a^2\,c}{4\,f^2}}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-a^4\,d^2\,f^4}}{\frac {a\,d^4\,\sqrt {-a^4\,d^2\,f^4}\,16{}\mathrm {i}}{f}+\frac {a\,c^2\,d^2\,\sqrt {-a^4\,d^2\,f^4}\,16{}\mathrm {i}}{f}}\right )\,\sqrt {-\frac {\sqrt {-a^4\,d^2\,f^4}+a^2\,c\,f^2}{4\,f^4}}+2\,\mathrm {atanh}\left (\frac {32\,a^2\,d^4\,\sqrt {\frac {\sqrt {-a^4\,d^2\,f^4}}{4\,f^4}-\frac {a^2\,c}{4\,f^2}}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{\frac {a\,d^4\,\sqrt {-a^4\,d^2\,f^4}\,16{}\mathrm {i}}{f^3}+\frac {a\,c^2\,d^2\,\sqrt {-a^4\,d^2\,f^4}\,16{}\mathrm {i}}{f^3}}-\frac {32\,c\,d^2\,\sqrt {\frac {\sqrt {-a^4\,d^2\,f^4}}{4\,f^4}-\frac {a^2\,c}{4\,f^2}}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-a^4\,d^2\,f^4}}{\frac {a\,d^4\,\sqrt {-a^4\,d^2\,f^4}\,16{}\mathrm {i}}{f}+\frac {a\,c^2\,d^2\,\sqrt {-a^4\,d^2\,f^4}\,16{}\mathrm {i}}{f}}\right )\,\sqrt {\frac {\sqrt {-a^4\,d^2\,f^4}-a^2\,c\,f^2}{4\,f^4}}-\mathrm {atanh}\left (\frac {f^3\,\left (\frac {16\,\left (a^2\,d^4-a^2\,c^2\,d^2\right )\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{f^2}+\frac {16\,c\,d^2\,\left (\sqrt {-a^4\,d^2\,f^4}+a^2\,c\,f^2\right )\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{f^4}\right )\,\sqrt {-\frac {\sqrt {-a^4\,d^2\,f^4}+a^2\,c\,f^2}{f^4}}}{16\,\left (a^3\,c^2\,d^3+a^3\,d^5\right )}\right )\,\sqrt {-\frac {\sqrt {-a^4\,d^2\,f^4}+a^2\,c\,f^2}{f^4}}-\mathrm {atanh}\left (\frac {f^3\,\left (\frac {16\,\left (a^2\,d^4-a^2\,c^2\,d^2\right )\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{f^2}-\frac {16\,c\,d^2\,\left (\sqrt {-a^4\,d^2\,f^4}-a^2\,c\,f^2\right )\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{f^4}\right )\,\sqrt {\frac {\sqrt {-a^4\,d^2\,f^4}-a^2\,c\,f^2}{f^4}}}{16\,\left (a^3\,c^2\,d^3+a^3\,d^5\right )}\right )\,\sqrt {\frac {\sqrt {-a^4\,d^2\,f^4}-a^2\,c\,f^2}{f^4}}+\frac {a\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,2{}\mathrm {i}}{f} \]

input
int((a + a*tan(e + f*x)*1i)*(c + d*tan(e + f*x))^(1/2),x)
 
output
2*atanh((32*a^2*d^4*((-a^4*d^2*f^4)^(1/2)/(4*f^4) - (a^2*c)/(4*f^2))^(1/2) 
*(c + d*tan(e + f*x))^(1/2))/((a*d^4*(-a^4*d^2*f^4)^(1/2)*16i)/f^3 + (a*c^ 
2*d^2*(-a^4*d^2*f^4)^(1/2)*16i)/f^3) - (32*c*d^2*((-a^4*d^2*f^4)^(1/2)/(4* 
f^4) - (a^2*c)/(4*f^2))^(1/2)*(c + d*tan(e + f*x))^(1/2)*(-a^4*d^2*f^4)^(1 
/2))/((a*d^4*(-a^4*d^2*f^4)^(1/2)*16i)/f + (a*c^2*d^2*(-a^4*d^2*f^4)^(1/2) 
*16i)/f))*(((-a^4*d^2*f^4)^(1/2) - a^2*c*f^2)/(4*f^4))^(1/2) - 2*atanh((32 
*a^2*d^4*(- (-a^4*d^2*f^4)^(1/2)/(4*f^4) - (a^2*c)/(4*f^2))^(1/2)*(c + d*t 
an(e + f*x))^(1/2))/((a*d^4*(-a^4*d^2*f^4)^(1/2)*16i)/f^3 + (a*c^2*d^2*(-a 
^4*d^2*f^4)^(1/2)*16i)/f^3) + (32*c*d^2*(- (-a^4*d^2*f^4)^(1/2)/(4*f^4) - 
(a^2*c)/(4*f^2))^(1/2)*(c + d*tan(e + f*x))^(1/2)*(-a^4*d^2*f^4)^(1/2))/(( 
a*d^4*(-a^4*d^2*f^4)^(1/2)*16i)/f + (a*c^2*d^2*(-a^4*d^2*f^4)^(1/2)*16i)/f 
))*(-((-a^4*d^2*f^4)^(1/2) + a^2*c*f^2)/(4*f^4))^(1/2) - atanh((f^3*((16*( 
a^2*d^4 - a^2*c^2*d^2)*(c + d*tan(e + f*x))^(1/2))/f^2 + (16*c*d^2*((-a^4* 
d^2*f^4)^(1/2) + a^2*c*f^2)*(c + d*tan(e + f*x))^(1/2))/f^4)*(-((-a^4*d^2* 
f^4)^(1/2) + a^2*c*f^2)/f^4)^(1/2))/(16*(a^3*d^5 + a^3*c^2*d^3)))*(-((-a^4 
*d^2*f^4)^(1/2) + a^2*c*f^2)/f^4)^(1/2) - atanh((f^3*((16*(a^2*d^4 - a^2*c 
^2*d^2)*(c + d*tan(e + f*x))^(1/2))/f^2 - (16*c*d^2*((-a^4*d^2*f^4)^(1/2) 
- a^2*c*f^2)*(c + d*tan(e + f*x))^(1/2))/f^4)*(((-a^4*d^2*f^4)^(1/2) - a^2 
*c*f^2)/f^4)^(1/2))/(16*(a^3*d^5 + a^3*c^2*d^3)))*(((-a^4*d^2*f^4)^(1/2) - 
 a^2*c*f^2)/f^4)^(1/2) + (a*(c + d*tan(e + f*x))^(1/2)*2i)/f